package com.peaksport.pkms.system.entity;

import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.peaksport.framework.base.entity.CoreBaseEntity;
import com.peaksport.framework.base.venum.BaseIntConverter;
import com.peaksport.framework.uuid.PKEntityType;
import com.peaksport.pkms.system.venum.ScheduleDefStatusEnum;

import lombok.Getter;
import lombok.Setter;

@SuppressWarnings("serial")
@Entity
@Table(name="CT_Task_ScheduleDef")
@Getter
@Setter 
public class ScheduleDefEntity extends CoreBaseEntity {
	
	@Column(name = "FNumber")
	private String number;
	@Column(name = "FName")
	private String name;
	@Column(name = "FRunnableClass")
	private String runnableClass;
	@Column(name = "FCron")
	private String cron;
	@Column(name = "FDesc")
	private String desc;
	@Column(name = "FStatus")
	@Convert(converter = BaseIntConverter.class)
	private ScheduleDefStatusEnum status;
	@Column(name = "FMicroService")
	private String microService;
	@Column(name = "FIsMutex")
	private boolean isMutex;

	@Override
	public PKEntityType getEntityType() {
		return PKEntityType.create("5D24AD87");
	}

}
